﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using elr_tracking_dal;

namespace elr_tracking_bal
{
    public static class GetCombos
    {
        public static List<string> GetPedimentos() {

            List<string> res = new List<string>();

            DataTable dt = new DataTable();
            dt = SrvDB.ExecuteQuery("EXEC SP_GET_PEDIMENTOS");

            for (int i = 0; i < dt.Rows.Count; i++) {

                res.Add(dt.Rows[i][0].ToString());
            }

            return res;
        }

        public static List<string> GetMoneda()
        {

            List<string> res = new List<string>();

            DataTable dt = new DataTable();
            dt = SrvDB.ExecuteQuery("EXEC SP_GET_MONEDA");

            for (int i = 0; i < dt.Rows.Count; i++)
            {

                res.Add(dt.Rows[i][0].ToString());
            }

            return res;
        }

        public static DataTable GetMonedaC(string s)
        {

            List<string> res = new List<string>();

            DataTable dt = new DataTable();
            dt = SrvDB.ExecuteQuery("EXEC SP_GET_MONEDA2 @S = '" + s + "'");

            return dt;
        }

        public static List<string> GetPoms()
        {

            List<string> res = new List<string>();

            DataTable dt = new DataTable();
            dt = SrvDB.ExecuteQuery("EXEC SP_GET_POMS");

            for (int i = 0; i < dt.Rows.Count; i++)
            {

                res.Add(dt.Rows[i][0].ToString());
            }

            return res;
        }
    }
}
